#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTimer>
#include <qcustomplot.h>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
    QTimer updateTimer;
    QTimer newDataTimer;
    int dataPointNumber;
    int channels;

private slots:
    void replot();
    void pointsChanged(int value);
    void minvalChanged(int value);
    void maxvalChanged(int value);
    void tickerChanged(int value);

    void mouseWheel(QWheelEvent* event);
    void mouseMove(QMouseEvent* event);
    void legendDoubleClick(QCPLegend *legend,  QCPAbstractLegendItem *item, QMouseEvent *event);

    void selectionChangedByUser(void);

    void newData(void);

    void autuScale(void);
    void clearPlottables(void);
    void startPlot(void);
    void stopPlot(void);
};
#endif // MAINWINDOW_H
